package ClassesFieldsMethods;

public class Person 
{
	//EGN-tata obiknoveno se paziat v string, a ne v long
	public String name = "Silvia";
	public int age = 18;
	String number = "1234567890";
	char sex = 'F';
	double weight;
	int health = 50;//from 0 to 100
	int starvationStatus = 50;//from 0 to 100
	int mentalStatus = 50;//from 0 to 100
	
	
	
	Person friend;//po default e sas stoinost null
	
	//metodite promeniat operirat varhu niakakvi stoinosti na klasa i obektite
	//v Java niama destructor-i
	//za da istriem object, triabva da napravim tova: car1 = null; sled koeto po niakoe vreme garbage collector-a shte go sabere
	
	void eat(int foodVolume)
	{
		if(starvationStatus + foodVolume >= 100)
		{
			starvationStatus = 100;
		}
		else
		{
		starvationStatus += foodVolume;
		}
	}
	void walk()
	{
		System.out.println(name + " is walking.");
		starvationStatus -= 5;
	}
	void growUp()
	{
		age++;
	}
	void drinkWater(double litres)
	{
		System.out.println(name + " is drinking " + litres + " litres of water.");
		starvationStatus += litres;
	}
	
	
	
}
